package com.sihan.swvp.service.jc.bzzy;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.sihan.swvp.dao.jc.bzzy.BzzyMajorDao;
import com.sihan.swvp.entity.jc.bzzy.BzzyMajor;
@Service
public class BzzyMajorService{

	@Autowired
	private BzzyMajorDao bzzyMajorDao;
	
	public Page<Map<String, Object>> getBzzyMajor(Map<String, Object> params,Integer page,Integer limit) {
		if(page !=null && limit !=null){
			PageHelper.startPage(page, limit);
		}
		return bzzyMajorDao.getBzzyMajor(params);
	}

	public void addBzzyMajor(BzzyMajor bean) {
		bzzyMajorDao.addBzzyMajor(bean);
	}

	public void updateBzzyMajor(BzzyMajor bean) {
		bzzyMajorDao.updateBzzyMajor(bean);
	}

	public int deleteBzzyMajor(Integer id) {
		return bzzyMajorDao.deleteBzzyMajor(id);
	}

	public Map<String, Object> getBzzyMajorValidate(BzzyMajor bean) {
		return bzzyMajorDao.getBzzyMajorValidate(bean);
	}
}
